package com.itheima;

import java.lang.reflect.Field;

public class Main {

    public static void main(String[] args) {
        Cat cat = new Cat("tom",12);
        Field[] fields = cat.getClass().getDeclaredFields();
        for (Field field : fields) {
            String name = field.getName();
            System.out.println(name);
        }

    }
}
